import isAbsoluteURL from '../helpers/isAbsoluteURL'
import combineURLs from '../helpers/combineURLs'

/**
 * 建立完整的url
 * @param baseURL string
 * @param requestedURL string
 */
export default function buildFullPath(baseURL: string, requestedURL: string): string {
    if (baseURL && !isAbsoluteURL(requestedURL)) {
        return combineURLs(baseURL, requestedURL);
    }
    return requestedURL;
}